package org.crackjack.android.model;

import java.io.Serializable;

import android.os.Parcel;
import android.os.Parcelable;

public class Profile extends Identify implements Serializable, Parcelable {

    private static final long serialVersionUID = 5059845617492663715L;
    private String login;
    private String password;

    public static final Parcelable.Creator<Profile> CREATOR = new Parcelable.Creator<Profile>() {
        @Override
        public Profile createFromParcel(Parcel in) {
            return new Profile(in);
        }

        @Override
        public Profile[] newArray(int size) {
            return new Profile[size];
        }
    };

    private Profile(Parcel parcel) {
        this.id = parcel.readLong();
        this.login = parcel.readString();
        this.password = parcel.readString();
    }

    public Profile() {

    }

    public String getLogin() {
        return login;
    }

    public void setLogin(String login) {
        this.login = login;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeLong(id);
        dest.writeString(login);
        dest.writeString(password);
    }
}
